﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace answer2
{
    class Solution
    {
        public static void Main()
        {
            int counts = 0;
            for(int i = 101; i <= 200; i++)
            {
                if (IsPrime(i))
                {
                    Console.Write(i + " ");
                    counts++;
                }
            }
            Console.WriteLine("\nThe number of primes from 101 to 200 is " + counts);
        }
        public static bool IsPrime(int n)
        {
            if (n == 2) return true;
            for (int i = 2; i <= Math.Sqrt(n); i++)
            {
                if (n % i == 0)
                {
                    return false;
                }
            }
            return true;
        }
    }
}
